import java.util.zip.*;
import java.nio.ByteBuffer;

//designed for testing methods out

public class ScratchPaper
{
	public static void main (String [] args)
	{

		ByteBuffer z = ByteBuffer.allocate(72);
		byte [] test = new byte [72];

		// Populate the test ethernet frame.
		// Preamble.
		for (int i = 0; i < 7; i++)
		{
			test[i] = 42;
		}

		// Start of frame.
		test[7] = 43;

		// Destination address.
		for (int i = 8; i < 14; i++)
		{
			test[i] = 15;
		}

		// Source address.
		for (int i = 14; i < 20; i++)
		{
			test[i] = 20;
		}

		// Type / length.
		test[20] = -128;
		test[21] = -128;

		// Payload / data.
		for (int i = 22; i < 68; i++)
		{
			test[i] = -101;
		}

		// CRC.
		test[68] = 103;
		test[69] = -128;
		test[70] = -8;
		test[71] = -20;

		z.put(test);

		try {
			EthernetFrame eframe = new EthernetFrame(z.array());
			System.out.println(eframe);
		} catch (InstantiationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}
}
